babyishfandomcom-20200214-history
Udev
|frequently_updated = yes |programming language = |operating system = Linuks körnol |platform = |size = |language = |status = |genre = Device node |license = GPL v2 |website = }} udev-wa daemon which dynamically creates and removes device nodes from /dev/, handles hotplug events and loads drivers at boot time. udev-wa divais männeijā für Linuks körnol. As the successor of devfsd and hotplug, udev primarily manages device nodes in the /dev directory. At the same time, udev also handles all user space events raised while hardware devices are added into the system or removed from it, including firmware loading as required by certain devices. Körrènt vörçion wa: 229-4ubuntu10. Nigè vörçion provaid sekyuriti ùpdeit für zero-length notify message triggers abort/denial of service, inklūdiŋ: * systemd-dont_assert_on_zero_length_message-lp1628687.patch: change assert to simple return + log * Thanks to Jorge Niedbalski for the patch. Ovèrvyu Unlike traditional Unix systems, where the device nodes in the /dev directory have been a static set of files, the Linux udev device manager dynamically provides only the nodes for the devices actually present on a system. Although devfs used to provide similar functionality, Greg Kroah-Hartman cited a number of reasons for preferring udev's implementation over devfs': * udev supports persistent device naming, which does not depend on, for example, the order in which the devices are plugged into the system. The default udev setup provides persistent names for storage devices. Any hard disk is recognized by its unique filesystem id, the name of the disk and the physical location on the hardware it is connected to. * udev executes entirely in user space, as opposed to devfs' kernel space. One consequence is that udev moved the naming policy out of the kernel and can run arbitrary programs to compose a name for the device from the device's properties, before the node is created; there, the whole process is also interruptible and it runs with a lower priority. The udev, as a whole, is divided into three parts: * Library libudev''1(:i386/amd64) that allows access to device information; it was incorporated into the systemd software bundle. * User space daemon ''udevd that manages the virtual /dev. * Administrative command-line utility udevadm for diagnostics. The system gets calls from the kernel via netlink socket. Earlier versions used hotplug, adding a link to themselves in /etc/hotplug.d/default with this purpose. Opèreiçion ]] udev is a generic kernel device manager. It runs as a daemon on a Linux system and listens (via netlink socket) to uevents the kernel sends out if a new device is initialized or a device is removed from the system. The system provides a set of rules that match against exported values of the event and properties of the discovered device. A matching rule will possibly name and create a device node and run configured programs to set up and configure the device. udev rules can match on properties like the kernel subsystem, the kernel device name, the physical location of the device, or properties like the device's serial number. Rules can also request information from external programs to name a device or specify a custom name that will always be the same, regardless of the order devices are discovered by the system. In the past a common way to use udev on Linux systems was to let it send events through a socket to HAL, which would perform further device-specific actions. For example, HAL would notify other software running on the system that the new hardware had arrived by issuing a broadcast message on the D-Bus IPC system to all interested processes. In this way, desktops such as GNOME or K Desktop Environment 3 could start the file browser to browse the file systems of newly attached USB flash drives and SD cards. By the middle of 2011 HAL had been deprecated by most Linux distributions as well as by the KDE, GNOME and XFCE desktop environments, among others. The functionality previously embodied in HAL has been integrated into udev itself, or moved to separate software such as udisks and upower. Històri udev-wa introdyusen in Linuks 2.5. Đe Linuks körnol vörçion 2.6.13 introdyusen or ùpdeiten a new version of the uevent interface. A system using a new version of udev will not boot with kernels older than 2.6.13 unless udev is disabled and a traditional /dev directory is used for device access. In April 2012, udev's codebase was merged into the systemd source tree. In October 2012, Linus Torvalds criticized Kay Sievers' approach of udev maintenance and bugs related to firmware loading, stating: In 2012, the Gentoo Linux project created a fork of systemd's udev codebase in order to avoid dependency on the systemd architecture. The resulting fork is called eudev and it makes udev functionality available without systemd. A stated goal of the project is to keep eudev independent of any Linux distribution or init system. The Gentoo project describes eudev as follows: On May 29, 2014, support for firmware loading through udev was dropped, as it has been decided that it is kernel's task to load firmware. Two days later, Lennart Poettering suggested this patch to be postponed until kdbus starts to be utilized by udev; at that point it is planned to switch udev into using kdbus as the underlying messaging system, and to get rid of the userspace-to-userspace netlink-based transport. Òŧās udev wa divelopen bai Greg Kroah-Hartman en Kay Sievers, wiŧ mani help from Dan Stekloff, amoŋ kitadè pīpols. Päkeijs # apt-get upgrade 正在讀取套件清單... 完成 正在重建相依關係 正在讀取狀態資料... 完成 籌備升級中... 完成 下列套件將會被升級： # gir1.2-gudev-1.0: introspekçion deitā # libgudev-1.0-0: GObject-beisen wräpen laibrari für libudev # libpam-systemd: sistèm en sörveises männeijā -- PAM mojul # libsystemd0 ## libsystemd-daemon0: yutiliti laibrari ## libsystemd-login0: login yutiliti laibrari ## systemd-services: rùntaim sörveises # udev ## libudev1 ## libudev-dev # systemd # systemd-sysv 升級 15 個，新安裝 0 個，移除 0 個，有 0 個未被升級。 需要下載 12.4 MB 的套件檔。 此操作完成之後，會多佔用 33.8 kB 的磁碟空間。 Do you want to continue? Y/n y Dawnloudiŋ #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main udev amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main libudev-dev amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main libudev1 amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main libpam-systemd amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main systemd-sysv amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main libsystemd0 amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main systemd amd64 219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main libgudev-1.0-0 amd64 1:219-7ubuntu5 kB #下載: http://tw.archive.ubuntu.com/ubuntu/ vivid-updates/main gir1.2-gudev-1.0 amd64 1:219-7ubuntu5 B 取得 12.4 MB 用了 3秒 (3,461 kB/s) Instoliŋ （讀取資料庫 ... 目前共安裝了 332941 個檔案和目錄。） 準備解開 .../libudev-dev_219-7ubuntu5_amd64.deb ... Unpacking libudev-dev:amd64 (219-7ubuntu5) over (219-7ubuntu4) ... 準備解開 .../libudev1_219-7ubuntu5_amd64.deb ... Unpacking libudev1:amd64 (219-7ubuntu5) over (219-7ubuntu4) ... 設定 libudev1:amd64 (219-7ubuntu5) ... （讀取資料庫 ... 目前共安裝了 332941 個檔案和目錄。） Processing triggers for libc-bin (2.21-0ubuntu4) ... 準備解開 .../udev_219-7ubuntu5_amd64.deb ... Unpacking udev (219-7ubuntu5) over (219-7ubuntu4) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for systemd (219-7ubuntu4) ... Processing triggers for man-db (2.7.0.2-5) ... 設定 udev (219-7ubuntu5) ... update-initramfs: deferring update (trigger activated) Processing triggers for initramfs-tools (0.103ubuntu15) ... update-initramfs: Generating /boot/initrd.img-3.19.0-16-generic （讀取資料庫 ... 目前共安裝了 332941 個檔案和目錄。） 準備解開 .../systemd-sysv_219-7ubuntu5_amd64.deb ... Unpacking systemd-sysv (219-7ubuntu5) over (219-7ubuntu4) ... Processing triggers for man-db (2.7.0.2-5) ... 設定 systemd-sysv (219-7ubuntu5) ... （讀取資料庫 ... 目前共安裝了 332941 個檔案和目錄。） 準備解開 .../libpam-systemd_219-7ubuntu5_amd64.deb ... Unpacking libpam-systemd:amd64 (219-7ubuntu5) over (219-7ubuntu4) ... 準備解開 .../libsystemd0_219-7ubuntu5_amd64.deb ... Unpacking libsystemd0:amd64 (219-7ubuntu5) over (219-7ubuntu4) ... Processing triggers for man-db (2.7.0.2-5) ... 設定 libsystemd0:amd64 (219-7ubuntu5) ... Processing triggers for libc-bin (2.21-0ubuntu4) ... （讀取資料庫 ... 目前共安裝了 332941 個檔案和目錄。） 準備解開 .../systemd_219-7ubuntu5_amd64.deb ... Unpacking systemd (219-7ubuntu5) over (219-7ubuntu4) ... Processing triggers for dbus (1.8.12-1ubuntu5) ... Processing triggers for ureadahead (0.100.0-19) ... Processing triggers for man-db (2.7.0.2-5) ... 設定 systemd (219-7ubuntu5) ... （讀取資料庫 ... 目前共安裝了 332941 個檔案和目錄。） 準備解開 .../libgudev-1.0-0_1%3a219-7ubuntu5_amd64.deb ... Unpacking libgudev-1.0-0:amd64 (1:219-7ubuntu5) over (1:219-7ubuntu4) ... 準備解開 .../gir1.2-gudev-1.0_1%3a219-7ubuntu5_amd64.deb ... Unpacking gir1.2-gudev-1.0 (1:219-7ubuntu5) over (1:219-7ubuntu4) ... 準備解開 .../printer-driver-postscript-hp_3.15.2-0ubuntu4.1_all.deb ... Unpacking printer-driver-postscript-hp (3.15.2-0ubuntu4.1) over (3.15.2-0ubuntu4) ... 準備解開 .../libsane-hpaio_3.15.2-0ubuntu4.1_amd64.deb ... Unpacking libsane-hpaio (3.15.2-0ubuntu4.1) over (3.15.2-0ubuntu4) ... 準備解開 .../hplip_3.15.2-0ubuntu4.1_amd64.deb ... Unpacking hplip (3.15.2-0ubuntu4.1) over (3.15.2-0ubuntu4) ... 準備解開 .../libhpmud0_3.15.2-0ubuntu4.1_amd64.deb ... Unpacking libhpmud0 (3.15.2-0ubuntu4.1) over (3.15.2-0ubuntu4) ... 準備解開 .../hplip-data_3.15.2-0ubuntu4.1_all.deb ... Unpacking hplip-data (3.15.2-0ubuntu4.1) over (3.15.2-0ubuntu4) ... 準備解開 .../printer-driver-hpcups_3.15.2-0ubuntu4.1_amd64.deb ... Unpacking printer-driver-hpcups (3.15.2-0ubuntu4.1) over (3.15.2-0ubuntu4) ... Processing triggers for cups (2.0.2-1ubuntu3) ... Updating PPD files for hpcups ... Updating PPD files for postscript-hp ... Processing triggers for dbus (1.8.12-1ubuntu5) ... Processing triggers for man-db (2.7.0.2-5) ... 設定 libudev-dev:amd64 (219-7ubuntu5) ... 設定 libpam-systemd:amd64 (219-7ubuntu5) ... 設定 libgudev-1.0-0:amd64 (1:219-7ubuntu5) ... 設定 gir1.2-gudev-1.0 (1:219-7ubuntu5) ... 設定 libhpmud0 (3.15.2-0ubuntu4.1) ... 設定 libsane-hpaio (3.15.2-0ubuntu4.1) ... 設定 hplip-data (3.15.2-0ubuntu4.1) ... 設定 printer-driver-hpcups (3.15.2-0ubuntu4.1) ... 設定 hplip (3.15.2-0ubuntu4.1) ... Creating/updating hplip user account... 設定 printer-driver-postscript-hp (3.15.2-0ubuntu4.1) ... Processing triggers for libc-bin (2.21-0ubuntu4) ... Riförènses Si osou * upstart * systemd Ikstörnol liŋks * udev source code * Discussion of udev rules * udev – A Userspace Implementation of devfs by Greg Kroah-Hartman * PySDM (Storage Device Manager and udev rule writer) * Introduction to device management * LWN article about devtmpfs * mdev documentation * eudev project Category:Interfaces of the Linux kernel Category:Linux kernel features Category:Linux file system-related software Category:Unix file system-related software Category:Computer configuration